package wildlife;

import java.sql.SQLException;

public class confirmimage {
int id;
String accrej;

public String getAccrej() {
	return accrej;
}

public void setAccrej(String accrej) {
	this.accrej = accrej;
}

public int getId() {
	return id;
}

public void setId(int id) {
	this.id = id;
}

public String execute() throws SQLException
{
	Connect c=new Connect();
	String query;
	if(accrej.equals("accept"))
	{
	query="update image set approved=1 where id="+id;
	}
	else
	{
		query="delete from image where id="+id;
	}
	c.dml(query);
	return "success";
}
}
